package com.unicom.projt.util;

import android.content.Context;
import android.content.Intent;
import com.unicom.projt.Main;
import com.unicom.projt.account.ChangePasswordPage;
import com.unicom.projt.query.QueryPaymentPage;

/**
 * Created by IntelliJ IDEA.
 * User: Lee
 * Date: 11-12-5
 * Time: 下午4:20
 */
public class PageJumpUtils {
    public static void jump(Context currentPage, Class targetPageClass) {
        Intent intent = new Intent(currentPage, targetPageClass);
        currentPage.startActivity(intent);
    }
//    public static void logoutAndJumpToMainPage(final Context currentPage){
//        AlertDialogUtils.showYesNoDiaLog(currentPage,"是否注销？",new AlertDialogUtils.Executor() {
//            @Override
//            public void execute() {
//                UserHolder.clean();
//                Intent intent = new Intent(currentPage, Main.class);
//                currentPage.startActivity(intent);
//            }
//        });
//    }

    public static void jumpToManageAccountPage(Context currentPage){
        Intent intent = new Intent(currentPage, ChangePasswordPage.class);
        currentPage.startActivity(intent);
    }

    public static void jumpToQueryPaymentPage(Context currentPage){
        Intent intent = new Intent(currentPage, QueryPaymentPage.class);
        currentPage.startActivity(intent);
    }
}
